<template>
  <div id="homecomp4">
    <form action="" @submit.prevent="handleSubmit">
      <h1>登录</h1>
      用户名：
      <input type="text" name="uname" v-model="loginData.uname" />
      <br />
      密码：
      <input type="text" name="pwd" v-model="loginData.pwd" />
      <input type="checkbox" v-model="ckx" />
      <h1>{{ loginData.title }}</h1>
      <input type="button" value="sss" />
      <input type="submit" value="提交" />
      <br />
    </form>
    <vbutton v-model="loginData.title"></vbutton>
  </div>
</template>

<script>
import Vbutton from "@/components/test/Vbutton.vue";

export default {
  name: "HomeComp4",
  components: { Vbutton },
  data() {
    return {
      aaa: "",
      loginData: {
        uname: "",
        pwd: "",
        title: "world",
      },
      ckx: "true",
    };
  },
  methods: {
    bbb(evt) {
      this.loginData.title = evt;
    },
    handleSubmit() {
      alert(1111);

      // doPost("login", this.loginData).then((res) => {
      //   console.log(res);
      // });
    },
  },
};
</script>

<style scoped></style>
